{extend name="base" /}
{block name="body"}
<!--幻灯片-->
<div class="main_visual">
    <div class="flicking_con">
        {slide limit="3"}
        <a target="{$target}" href='{$url}'>{$key+1}</a>
        {/slide}
    </div>
    <div class="main_image">
        <ul>
            {slide limit="3"}
            <li><a style="padding: 0px 0px; border: solid 0px red;" target="{$target}" href='{$url}'><img src="/{$image}" alt="{$name}"/></a></li>
            {/slide}
        </ul>
        <a href="javascript:;" id="btn_prev"></a>
        <a href="javascript:;" id="btn_next"></a>
    </div>
</div>
<!--搜索框-->
<form method="post" action="{:url('/search')}"  >
    <div class="search_content" style="width: 100%;">
        <div class="search_box" style="max-width: 800px; margin-bottom: 30px;">
            <input type="text" id="searchKey" placeholder="&#xe674;  请输入关键词搜索"/>
            <button onclick='location.href = "{:url('/search')}?word=" + $("#searchKey").val(); return false;'>搜索</button>
        </div>
    </div>
</form>
<!--导航图标-->
<div class="index-nav">
    <div class="index-nav-list">

        <a class="nobefore"  href="{:url('/user')}">
            <img src="__IMAGES__/1ff9ae9b-be4b-4a62-8346-1d436d4a0313.png"/>
            会员中心
        </a>

        <a class="nobefore"  href="{:url('/free')}">
            <img src="__IMAGES__/5a584e60-fdbf-49f1-9f6b-9901e343f4b5.png"/>
            免费区
        </a>

        <a class="nobefore"  href="{:url('/user')}">
            <img src="__IMAGES__/42b053aa-d50b-4a93-99aa-c1f3390ca4bb.png"/>
            通知公告
        </a>

        <a class="nobefore"  href="{:url('/user')}">
            <img src="__IMAGES__/6d6955c5-f5c6-426f-8531-957e30296f5e.png"/>
            全部分类
        </a>

    </div>
</div>
<!--公告区域-->
<div class="augg" style="background-color: #f4f5f0;">
    <div class="aumore" style='margin-left: 0px;'>
        <svg t="1583574256073" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="https://www.w3.org/2000/svg"
             p-id="10590" width="24" height="24">
            <path d="M512.74 57C266.71 57 67.26 256.44 67.26 502.48c0 246.03 199.45 445.48 445.48 445.48s445.48-199.45 445.48-445.48C958.22 256.44 758.77 57 512.74 57z m127.98 693.31c0 10.47-5.4 20.18-14.31 25.7a30.227 30.227 0 0 1-15.9 4.51c-4.6 0-9.21-1.06-13.45-3.16L367.33 662.98c-14.96-7.44-21.04-25.58-13.6-40.51 7.44-14.93 25.67-21.01 40.51-13.6l186.06 92.65V301.66l-196.94 89.9c-3.92 1.77-8.2 2.71-12.54 2.71H270.08v199.84h21.18c16.7 0 30.21 13.51 30.21 30.21s-13.51 30.21-30.21 30.21h-51.4c-16.7 0-30.21-13.51-30.21-30.21V364.06c0-16.7 13.51-30.21 30.21-30.21h124.36l233.74-106.69a30.445 30.445 0 0 1 28.89 2.09 30.216 30.216 0 0 1 13.87 25.4v495.66z m110.99-89.64c-5.96 6.9-14.37 10.44-22.84 10.44-7.02 0-14.04-2.42-19.77-7.38-12.63-10.92-13.99-29.98-3.07-42.6 107.43-124.16 5.52-233.15 1.12-237.72-11.51-12.01-11.21-31.13 0.77-42.69 11.98-11.54 31.01-11.27 42.58 0.59 50.87 52.17 116.58 186.06 1.21 319.36z"
                  p-id="10591" fill="#6bbaf1"></path>
        </svg>

        <div id="marquee">
            {help_list limit="5" affiche='1'}
            <li><a title="{$title}" href="{:url('/help/' . $id,'','html')}">&nbsp;{$title}</a><span>{$create_time | date='Y-m-d' }</span></li>
            {/help_list}
        </div>
    </div>
</div>

<!--正文区域-->
<div class="container">

    <div class="special-item-h2"><span>推荐文档</span></div>
    <div class="special-content">
        {article_list is_recommend="1" limit="5"}
        <div class="content-item">
            <a class="lt" href="{:url('/zy-' . $id,"","html",true)}" title="{$title}">
                <img alt="{$title}" src="{$article | showThumbnail}">
            </a>
            <div>
                <h2><span class="{$ext| ltrim='.'}" style="width: 20px; ">&nbsp; </span><a href="{:url('/zy-' . $id,"","html",true)}" title="{$title}">{$title}</a></h2>
                <p>时间: {$create_time | date='Y-m-d' }&nbsp;&nbsp; 大小: {$size}&nbsp;&nbsp; 页数: {$total_page}</p>
            </div>
            <div class="clear"></div>
        </div>
        {/article_list}
    </div>

    {category_list is_home="1"}
    <div class="special-item-h2"><span>{$category.name}</span></div>
    <div class="special-content">
        {article_list subcid=$category['id'] limit="8"}
        <div class="content-item">
            <a class="lt" href="{:url('/zy-' . $id,"","html",true)}" title="{$title}"><img alt="{$title}" src="{$article | showThumbnail}"></a>
            <div>
                <h2><span class="{$ext| ltrim='.'}" style="width: 20px; ">&nbsp; </span><a href="{:url('/zy-' . $id,"","html",true)}" title="{$title}">{$title}</a></h2>
                <p>时间: {$create_time | date='Y-m-d' }&nbsp;&nbsp; 大小: {$size}&nbsp;&nbsp; 页数: {$total_page}</p>
            </div>
            <div class="clear"></div>
        </div>
        {/article_list}
    </div>
    {/category_list}

    <div class="special-item-h2"><span>最近更新</span></div>
    <div class="special-content">
        {last_update limit="8"}
        <div class="content-item">
            <a class="lt" href="{:url('/zy-' . $id,"","html",true)}" title="{$title}">
            <img alt="{$title}" src="{$article | showThumbnail}">
            </a>
            <div>
                <h2><span class="{$ext| ltrim='.'}" style="width: 20px; ">&nbsp; </span><a href="{:url('/zy-' . $id,"","html",true)}" title="{$title}">{$title}</a></h2>
                <p>时间: {$create_time | date='Y-m-d' }&nbsp;&nbsp; 大小: {$size}&nbsp;&nbsp; 页数: {$total_page}</p>
            </div>
            <div class="clear"></div>
        </div>
        {/last_update}
    </div>

    <div>
        <a href="{:url('/category')}" class="btn-more">点击查看更多文档>></a>
    </div>
</div>
{/block}

{block name="footer"}
<script type="text/javascript" src="__JS__/MSClass.js"></script>
<script>
    var pageSize = getPageSize();
    new Marquee("marquee", 0, 1, pageSize[0] - 50, 33, 20, 4000, 5000, 0);
</script>

<script type="text/javascript">
    $(document).ready(function () {
        var arr2 = getPageSize();
        var maxWidth = arr2[0];

        var height = 200;
        height = maxWidth * height / maxWidth;

        $('.main_visual').css({
            height: (height + "px")
        });
        $('.main_image').css({
            height: (height + "px")
        });
        $('.main_image ul').css({
            height: (height + "px")
        });
        $('.main_image li').css({
            height: (height + "px")
        });
        $('.main_image li img').css({
            height: (height + "px")
        });
        $('.main_image li a').css({
            height: (height + "px")
        });
        $('div.flicking_con').css({
            top: ((height - 30) + "px")
        });
        $(".main_visual").hover(function () {
            $("#btn_prev,#btn_next").fadeIn()
        }, function () {
            $("#btn_prev,#btn_next").fadeOut()
        });
        $dragBln = false;
        $(".main_image").touchSlider({
            flexible: true,
            speed: 200,
            btn_prev: $("#btn_prev"),
            btn_next: $("#btn_next"),
            paging: $(".flicking_con a"),
            counter: function (e) {
                $(".flicking_con a").removeClass("on").eq(e.current - 1).addClass("on");
            }
        });
        $(".main_image").bind("mousedown", function () {
            $dragBln = false;
        });
        $(".main_image").bind("dragstart", function () {
            $dragBln = true;
        });
        $(".main_image a").click(function () {
            if ($dragBln) {
                return false;
            }
        });
        timer = setInterval(function () {
            $("#btn_next").click();
        }, 5000);
        $(".main_visual").hover(function () {
            clearInterval(timer);
        }, function () {
            timer = setInterval(function () {
                $("#btn_next").click();
            }, 5000);
        });
        $(".main_image").bind("touchstart", function () {
            clearInterval(timer);
        }).bind("touchend", function () {
            timer = setInterval(function () {
                $("#btn_next").click();
            }, 5000);
        });
    });
</script>
{/block}